[pull] main from remix-run:main#276
Merged
Merged
Conversation
…14942) * fix: fire onError for errors already present in initial router state When a loader throws synchronously and the error is already in the initial router state at mount time, the onError callback was never called because it only fires inside the router subscriber (which only runs on subsequent state updates). Added a useEffect that checks for errors in router.state on mount and fires onError for each one. This ensures the onError callback is called for all errors, including those that occur before the subscriber is set up. Fixes #14941 * Add changeset and sign CLA * Updates * Apply suggestions from code review Co-authored-by: Matt Brophy <matt@brophy.org> * Migrate changeset --------- Co-authored-by: Matt Brophy <matt@brophy.org>
…on (#15022) * fix(react-router): clear isHydrationRequest on entry so aborted hydrations dont leak stale SSR data into subsequent loader calls When a clientLoader.hydrate=true loader is still pending (awaiting async work before serverLoader()) and the hydration POP is aborted by a new navigation, the finally block that clears isHydrationRequest never runs. The next loader invocation reuses the same closure, sees isHydrationRequest=true, and serverLoader() returns the SSR initialData captured for the original URL instead of fetching fresh data. Capture the flag into a local on entry and clear the closure immediately so any subsequent invocation observes false regardless of whether the prior call ever completed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Remove focused test --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Cleanup lint issues in tests, examples, scripts, and integration Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Cleanup lint issues in source code Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Revert "Cleanup lint issues in source code" This reverts commit 949599b. * Revert "Cleanup lint issues in tests, examples, scripts, and integration" This reverts commit db7be24. * Fix lint errors * Fix test --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ry name (#15027) When Vite's `base` config and React Router's `basename` both share the same path segment as the app directory (e.g. `base: "/app/"`, `basename: "/app/"`), Vite strips the base prefix from server-build virtual module import paths during SSR module loading. This caused "Failed to load url /root.tsx" errors because "/app/root.tsx" was being resolved to "/root.tsx". Fix by passing `publicPath` to `resolveFileUrl` when generating server-build virtual module imports, so that the function falls back to the `/@fs/` absolute path form when the root-relative URL would conflict with the Vite base path. Fixes #13716 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tations (#15028) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…15039) * Fire onError for initial-load errors when RouterProvider mounts late Buffer state updates that fire while no subscribers are attached and replay them to the first subscriber, so initial-load errors emitted during router.initialize() are delivered to onError even when RouterProvider mounts after the router has finished initializing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Update change file --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Remix Run Bot <hello@remix.run>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )